<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>js写在哪里</title>
		<style>
			
			#demo {
				height:1000px;
			}
		</style>
	</head>
	<body>
		<div id="demo"></div>
		<a href="javascript:;">aaa</a>
		
		<a href="http://www.baidu.com">aaa</a>
		<!--
			方法一：写在script里面：<script></script>
			方法二：js文件中:<script src=''></script>
			方法三：写在标签中
			方法四：写在a标签的href中
			
		-->
		<script>
			function fn () {
				
			}
			
			
		</script>
	</body>
</html>
